import request from '@/utils/request'
export default{
    //根据条件分页查询
    getTeacherList(current,pagesize,teacherQuery) {
       return request({
         url: `/eduservice/edu-teacher/page/${current}/${pagesize}`,
         method: 'post',
         //teacherQuery条件对象，后端使用RequestBody获取数据
            //data表示把对象转换json进行传递到接口里面
         data: teacherQuery
       })
    },
    //根据ID删除讲师
    removeTeacherById(id) {
      return request({
        url: `/eduservice/edu-teacher/${id}`,
        method: 'delete'
      })
   },
    //根据ID查询讲师
    getTeacherInfo(id) {
      return request({
        url: `/eduservice/edu-teacher/${id}`,
        method: 'get'
      })
   },
    //保存或者修改讲师
    saveOrUpdateTeacher(teacher) {
      return request({
        url: `/eduservice/edu-teacher/save`,
        method: 'post',
        data: teacher
      })
   }

}
